<template>
  <span class="card-span">

    <span class="card-title">{{title}}</span>
    <span v-if="subTitle && subTitle.length > 0">
      <span v-for="str in subTitle" v-bind:key="str" class="card-sub-title">
        {{str}}
        <br>
      </span>
    </span>
    <br>
    <span>
      <a-button class="myButton" @click="doClick">{{buttonText}}</a-button>
    </span>

  </span>
</template>

<script>
export default {
  name: "IndexCard",
  props: {
    title: String,
    subTitle: Array,
    buttonText: String
  },
  methods: {
    doClick() {
      this.$emit("clickCallBack");
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.card-span {
  text-align: start;
  border: 1px solid #4c4c4c;
  padding: 40px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  min-width: 550px;
  /* flex: 1; */
}
.card-span:hover {
  border: 1px solid #35bfa5;
  cursor: pointer;
}

.card-title {
  font-size: 30px;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 2px;
  padding-bottom: 20px;
}

.card-sub-title {
  font-size: 18px;
  color: #f5f5f5;
  letter-spacing: 1px;
  line-height: 35px;
}

.myButton {
  background: transparent;
  color: white;
  border: 1px solid #ffffff;
  border-radius: 0;
  font-weight: bold;
  padding: 10px 55px 35px 55px;
  font-size: 20px;
}
.myButton:hover {
  background: #35bfa5;
  border: 0;
}
</style>
